using System;
using System.Linq;
using MvcMall.Core.Contacts.Repositories;
using MvcMall.Core.Domains;
using MvcMall.Core.Enums;
using NHibernate.Linq;

namespace MvcMall.Data.Repositories
{
    public class MailTemplateRepository : DataRepository<MailTemplate>, IMailTemplateRepository
    {
        public MailTemplate Get(MailTemplateType mailType)
        {
            return Session.Query<MailTemplate>()
                .Where(m => m.MailTemplateType == mailType)
                .FirstOrDefault();
        }
    }
}